package com.wen.controller;

import com.wen.bean.UserInfoBean;
import com.wen.model.UserModel;
import com.wen.uilts.MyUilts;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


@WebServlet(name = "ModifyJump", value = "/ModifyJump")
public class UserInfoModifyServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //获取需要修改记录的id值
        String strId = request.getParameter("id");
        //根据id查询该条数据的记录
        UserInfoBean userInfoBean = MyUilts.getNewInstance(UserModel.class).queryUserInfoById(strId);
        request.getSession().setAttribute("userBean", userInfoBean);
        request.getRequestDispatcher("WEB-INF/viewPages/userInfoB/UserInfoModify.jsp").forward(request, response);

    }
}
